APM.BusinessDetailNodedetailController = Ember.Controller.extend({
	menus: Ember.computed("model", function(key, value){
	
		if(arguments.length == 1){
			var ctrl = this;
			var menus = Ember.A();
			menus.isLoading = true;
			setTimeout(function(){
				ctrl.requireNodeMenus(ctrl.model.id);
			});
			return menus;
		}else{
			return value;
		}
	}),

	requireNodeMenus:function(nodeId) {
		var ctrl = this;
		this.set("menus.isLoading", true);
		this.store.ajax("GET", "node/menus", {
			nodeId: nodeId
		})
		.then(function(response){
			ctrl.set("menus", Ember.A(response.result));

			if(overviewOrCenterSwitch == "business"){
				ctrl.set("menus",Ember.A([]));
			}
			ctrl.set("menus.isLoading", false);
			return response.result;
		});
	}
});